class_name RichLabelDemo
extends RichTextLabel

func _init():
    _loadFont();
    self.bbcode_enabled = true;
    self.bbcode_text = "BBCode [color=blue]blue[/color]"
    # 需要设置大小 才会显示
    self.rect_size = Vector2(300,100);


func _loadFont():
    var dynamic_font = DynamicFont.new()
    dynamic_font.font_data = load("res://assets/fonts/FZKTK.TTF")
    dynamic_font.size = 32
    self.set("custom_fonts/font", dynamic_font);
